// Generated from minisyys.g4 by ANTLR 4.9.2
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class minisyysParser extends Parser {
	static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }

	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		CONST=1, VOID=2, INT=3, WHILE=4, BREAK=5, CONTINUE=6, RETURN=7, IF=8, 
		ELSE=9, LPAREN=10, RPAREN=11, LBRACE=12, RBRACE=13, LBRACKET=14, RBRACKET=15, 
		ADD=16, SUB=17, MUL=18, DIV=19, MODULUS=20, NUMBER=21, EQUALS=22, NEQUALS=23, 
		MORETHAN=24, LESSTHAN=25, GTEQUALS=26, LTEQUALS=27, OR=28, AND=29, SCOLON=30, 
		ASSIGN=31, COMMA=32, QMARK=33, COLON=34, EXCL=35, ID=36, INTP=37, HEX=38, 
		OCT=39, DIGITS=40, COMMENT=41, SPACE=42;
	public static final int
		RULE_file = 0, RULE_globalVar = 1, RULE_functionDefinition = 2, RULE_name = 3, 
		RULE_type = 4, RULE_functionBody = 5, RULE_compoundstatement = 6, RULE_statement = 7, 
		RULE_selectionstatement = 8, RULE_whilestatement = 9, RULE_jumpstatement = 10, 
		RULE_retstatement = 11, RULE_functionCall = 12, RULE_expressionList = 13, 
		RULE_expression = 14, RULE_andExpr = 15, RULE_eqExpr = 16, RULE_relExpr = 17, 
		RULE_addExpr = 18, RULE_mulExpr = 19, RULE_opExpr = 20, RULE_unop = 21, 
		RULE_atom = 22, RULE_lookup = 23, RULE_index = 24, RULE_declarationarId = 25, 
		RULE_declarationId = 26, RULE_arr = 27, RULE_iniList = 28, RULE_ini = 29, 
		RULE_ass = 30;
	private static String[] makeRuleNames() {
		return new String[] {
			"file", "globalVar", "functionDefinition", "name", "type", "functionBody", 
			"compoundstatement", "statement", "selectionstatement", "whilestatement", 
			"jumpstatement", "retstatement", "functionCall", "expressionList", "expression", 
			"andExpr", "eqExpr", "relExpr", "addExpr", "mulExpr", "opExpr", "unop", 
			"atom", "lookup", "index", "declarationarId", "declarationId", "arr", 
			"iniList", "ini", "ass"
		};
	}
	public static final String[] ruleNames = makeRuleNames();

	private static String[] makeLiteralNames() {
		return new String[] {
			null, "'const'", "'void'", "'int'", "'while'", "'break'", "'continue'", 
			"'return'", "'if'", "'else'", "'('", "')'", "'{'", "'}'", "'['", "']'", 
			"'+'", "'-'", "'*'", "'/'", "'%'", null, "'=='", "'!='", "'>'", "'<'", 
			"'>='", "'<='", "'||'", "'&&'", "';'", "'='", "','", "'?'", "':'", "'!'", 
			null, null, null, "'0'"
		};
	}
	private static final String[] _LITERAL_NAMES = makeLiteralNames();
	private static String[] makeSymbolicNames() {
		return new String[] {
			null, "CONST", "VOID", "INT", "WHILE", "BREAK", "CONTINUE", "RETURN", 
			"IF", "ELSE", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACKET", "RBRACKET", 
			"ADD", "SUB", "MUL", "DIV", "MODULUS", "NUMBER", "EQUALS", "NEQUALS", 
			"MORETHAN", "LESSTHAN", "GTEQUALS", "LTEQUALS", "OR", "AND", "SCOLON", 
			"ASSIGN", "COMMA", "QMARK", "COLON", "EXCL", "ID", "INTP", "HEX", "OCT", 
			"DIGITS", "COMMENT", "SPACE"
		};
	}
	private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);

	/**
	 * @deprecated Use {@link #VOCABULARY} instead.
	 */
	@Deprecated
	public static final String[] tokenNames;
	static {
		tokenNames = new String[_SYMBOLIC_NAMES.length];
		for (int i = 0; i < tokenNames.length; i++) {
			tokenNames[i] = VOCABULARY.getLiteralName(i);
			if (tokenNames[i] == null) {
				tokenNames[i] = VOCABULARY.getSymbolicName(i);
			}

			if (tokenNames[i] == null) {
				tokenNames[i] = "<INVALID>";
			}
		}
	}

	@Override
	@Deprecated
	public String[] getTokenNames() {
		return tokenNames;
	}

	@Override

	public Vocabulary getVocabulary() {
		return VOCABULARY;
	}

	@Override
	public String getGrammarFileName() { return "minisyys.g4"; }

	@Override
	public String[] getRuleNames() { return ruleNames; }

	@Override
	public String getSerializedATN() { return _serializedATN; }

	@Override
	public ATN getATN() { return _ATN; }

	public minisyysParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}

	public static class FileContext extends ParserRuleContext {
		public TerminalNode EOF() { return getToken(minisyysParser.EOF, 0); }
		public List<GlobalVarContext> globalVar() {
			return getRuleContexts(GlobalVarContext.class);
		}
		public GlobalVarContext globalVar(int i) {
			return getRuleContext(GlobalVarContext.class,i);
		}
		public List<FunctionDefinitionContext> functionDefinition() {
			return getRuleContexts(FunctionDefinitionContext.class);
		}
		public FunctionDefinitionContext functionDefinition(int i) {
			return getRuleContext(FunctionDefinitionContext.class,i);
		}
		public FileContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_file; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterFile(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitFile(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitFile(this);
			else return visitor.visitChildren(this);
		}
	}

	public final FileContext file() throws RecognitionException {
		FileContext _localctx = new FileContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_file);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(66);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << CONST) | (1L << VOID) | (1L << INT))) != 0)) {
				{
				setState(64);
				_errHandler.sync(this);
				switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
				case 1:
					{
					setState(62);
					globalVar();
					}
					break;
				case 2:
					{
					setState(63);
					functionDefinition();
					}
					break;
				}
				}
				setState(68);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(69);
			match(EOF);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class GlobalVarContext extends ParserRuleContext {
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public List<AssContext> ass() {
			return getRuleContexts(AssContext.class);
		}
		public AssContext ass(int i) {
			return getRuleContext(AssContext.class,i);
		}
		public TerminalNode SCOLON() { return getToken(minisyysParser.SCOLON, 0); }
		public TerminalNode CONST() { return getToken(minisyysParser.CONST, 0); }
		public List<TerminalNode> COMMA() { return getTokens(minisyysParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(minisyysParser.COMMA, i);
		}
		public GlobalVarContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_globalVar; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterGlobalVar(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitGlobalVar(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitGlobalVar(this);
			else return visitor.visitChildren(this);
		}
	}

	public final GlobalVarContext globalVar() throws RecognitionException {
		GlobalVarContext _localctx = new GlobalVarContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_globalVar);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(72);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==CONST) {
				{
				setState(71);
				match(CONST);
				}
			}

			setState(74);
			type();
			setState(75);
			ass();
			setState(80);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(76);
				match(COMMA);
				setState(77);
				ass();
				}
				}
				setState(82);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(83);
			match(SCOLON);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class FunctionDefinitionContext extends ParserRuleContext {
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public TerminalNode ID() { return getToken(minisyysParser.ID, 0); }
		public TerminalNode LPAREN() { return getToken(minisyysParser.LPAREN, 0); }
		public TerminalNode RPAREN() { return getToken(minisyysParser.RPAREN, 0); }
		public FunctionBodyContext functionBody() {
			return getRuleContext(FunctionBodyContext.class,0);
		}
		public NameContext name() {
			return getRuleContext(NameContext.class,0);
		}
		public FunctionDefinitionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_functionDefinition; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterFunctionDefinition(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitFunctionDefinition(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitFunctionDefinition(this);
			else return visitor.visitChildren(this);
		}
	}

	public final FunctionDefinitionContext functionDefinition() throws RecognitionException {
		FunctionDefinitionContext _localctx = new FunctionDefinitionContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_functionDefinition);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(85);
			type();
			setState(86);
			match(ID);
			setState(87);
			match(LPAREN);
			setState(89);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==VOID || _la==INT) {
				{
				setState(88);
				name();
				}
			}

			setState(91);
			match(RPAREN);
			setState(92);
			functionBody();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class NameContext extends ParserRuleContext {
		public List<TypeContext> type() {
			return getRuleContexts(TypeContext.class);
		}
		public TypeContext type(int i) {
			return getRuleContext(TypeContext.class,i);
		}
		public List<TerminalNode> ID() { return getTokens(minisyysParser.ID); }
		public TerminalNode ID(int i) {
			return getToken(minisyysParser.ID, i);
		}
		public List<TerminalNode> COMMA() { return getTokens(minisyysParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(minisyysParser.COMMA, i);
		}
		public NameContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_name; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterName(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitName(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitName(this);
			else return visitor.visitChildren(this);
		}
	}

	public final NameContext name() throws RecognitionException {
		NameContext _localctx = new NameContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_name);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(94);
			type();
			setState(95);
			match(ID);
			setState(102);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(96);
				match(COMMA);
				setState(97);
				type();
				setState(98);
				match(ID);
				}
				}
				setState(104);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class TypeContext extends ParserRuleContext {
		public TerminalNode VOID() { return getToken(minisyysParser.VOID, 0); }
		public TerminalNode INT() { return getToken(minisyysParser.INT, 0); }
		public TypeContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_type; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterType(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitType(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitType(this);
			else return visitor.visitChildren(this);
		}
	}

	public final TypeContext type() throws RecognitionException {
		TypeContext _localctx = new TypeContext(_ctx, getState());
		enterRule(_localctx, 8, RULE_type);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(105);
			_la = _input.LA(1);
			if ( !(_la==VOID || _la==INT) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class FunctionBodyContext extends ParserRuleContext {
		public TerminalNode LBRACE() { return getToken(minisyysParser.LBRACE, 0); }
		public TerminalNode RBRACE() { return getToken(minisyysParser.RBRACE, 0); }
		public List<StatementContext> statement() {
			return getRuleContexts(StatementContext.class);
		}
		public StatementContext statement(int i) {
			return getRuleContext(StatementContext.class,i);
		}
		public FunctionBodyContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_functionBody; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterFunctionBody(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitFunctionBody(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitFunctionBody(this);
			else return visitor.visitChildren(this);
		}
	}

	public final FunctionBodyContext functionBody() throws RecognitionException {
		FunctionBodyContext _localctx = new FunctionBodyContext(_ctx, getState());
		enterRule(_localctx, 10, RULE_functionBody);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(107);
			match(LBRACE);
			setState(111);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << CONST) | (1L << VOID) | (1L << INT) | (1L << WHILE) | (1L << BREAK) | (1L << CONTINUE) | (1L << RETURN) | (1L << IF) | (1L << LBRACE) | (1L << ID))) != 0)) {
				{
				{
				setState(108);
				statement();
				}
				}
				setState(113);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(114);
			match(RBRACE);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class CompoundstatementContext extends ParserRuleContext {
		public TerminalNode LBRACE() { return getToken(minisyysParser.LBRACE, 0); }
		public TerminalNode RBRACE() { return getToken(minisyysParser.RBRACE, 0); }
		public List<StatementContext> statement() {
			return getRuleContexts(StatementContext.class);
		}
		public StatementContext statement(int i) {
			return getRuleContext(StatementContext.class,i);
		}
		public CompoundstatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_compoundstatement; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterCompoundstatement(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitCompoundstatement(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitCompoundstatement(this);
			else return visitor.visitChildren(this);
		}
	}

	public final CompoundstatementContext compoundstatement() throws RecognitionException {
		CompoundstatementContext _localctx = new CompoundstatementContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_compoundstatement);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(116);
			match(LBRACE);
			setState(120);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << CONST) | (1L << VOID) | (1L << INT) | (1L << WHILE) | (1L << BREAK) | (1L << CONTINUE) | (1L << RETURN) | (1L << IF) | (1L << LBRACE) | (1L << ID))) != 0)) {
				{
				{
				setState(117);
				statement();
				}
				}
				setState(122);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(123);
			match(RBRACE);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class StatementContext extends ParserRuleContext {
		public CompoundstatementContext compoundstatement() {
			return getRuleContext(CompoundstatementContext.class,0);
		}
		public SelectionstatementContext selectionstatement() {
			return getRuleContext(SelectionstatementContext.class,0);
		}
		public WhilestatementContext whilestatement() {
			return getRuleContext(WhilestatementContext.class,0);
		}
		public JumpstatementContext jumpstatement() {
			return getRuleContext(JumpstatementContext.class,0);
		}
		public RetstatementContext retstatement() {
			return getRuleContext(RetstatementContext.class,0);
		}
		public TerminalNode SCOLON() { return getToken(minisyysParser.SCOLON, 0); }
		public FunctionCallContext functionCall() {
			return getRuleContext(FunctionCallContext.class,0);
		}
		public DeclarationarIdContext declarationarId() {
			return getRuleContext(DeclarationarIdContext.class,0);
		}
		public DeclarationIdContext declarationId() {
			return getRuleContext(DeclarationIdContext.class,0);
		}
		public TerminalNode ID() { return getToken(minisyysParser.ID, 0); }
		public StatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_statement; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterStatement(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitStatement(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitStatement(this);
			else return visitor.visitChildren(this);
		}
	}

	public final StatementContext statement() throws RecognitionException {
		StatementContext _localctx = new StatementContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_statement);
		try {
			setState(143);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(125);
				compoundstatement();
				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(126);
				selectionstatement();
				}
				break;
			case 3:
				enterOuterAlt(_localctx, 3);
				{
				setState(127);
				whilestatement();
				}
				break;
			case 4:
				enterOuterAlt(_localctx, 4);
				{
				setState(128);
				jumpstatement();
				}
				break;
			case 5:
				enterOuterAlt(_localctx, 5);
				{
				setState(129);
				retstatement();
				setState(130);
				match(SCOLON);
				}
				break;
			case 6:
				enterOuterAlt(_localctx, 6);
				{
				setState(132);
				functionCall();
				setState(133);
				match(SCOLON);
				}
				break;
			case 7:
				enterOuterAlt(_localctx, 7);
				{
				setState(135);
				declarationarId();
				setState(136);
				match(SCOLON);
				}
				break;
			case 8:
				enterOuterAlt(_localctx, 8);
				{
				setState(138);
				declarationId();
				setState(139);
				match(SCOLON);
				}
				break;
			case 9:
				enterOuterAlt(_localctx, 9);
				{
				setState(141);
				match(ID);
				setState(142);
				match(SCOLON);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class SelectionstatementContext extends ParserRuleContext {
		public TerminalNode IF() { return getToken(minisyysParser.IF, 0); }
		public TerminalNode LPAREN() { return getToken(minisyysParser.LPAREN, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public TerminalNode RPAREN() { return getToken(minisyysParser.RPAREN, 0); }
		public List<StatementContext> statement() {
			return getRuleContexts(StatementContext.class);
		}
		public StatementContext statement(int i) {
			return getRuleContext(StatementContext.class,i);
		}
		public TerminalNode ELSE() { return getToken(minisyysParser.ELSE, 0); }
		public SelectionstatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_selectionstatement; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterSelectionstatement(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitSelectionstatement(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitSelectionstatement(this);
			else return visitor.visitChildren(this);
		}
	}

	public final SelectionstatementContext selectionstatement() throws RecognitionException {
		SelectionstatementContext _localctx = new SelectionstatementContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_selectionstatement);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(145);
			match(IF);
			setState(146);
			match(LPAREN);
			setState(147);
			expression();
			setState(148);
			match(RPAREN);
			setState(149);
			statement();
			setState(152);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) {
			case 1:
				{
				setState(150);
				match(ELSE);
				setState(151);
				statement();
				}
				break;
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class WhilestatementContext extends ParserRuleContext {
		public TerminalNode WHILE() { return getToken(minisyysParser.WHILE, 0); }
		public TerminalNode LPAREN() { return getToken(minisyysParser.LPAREN, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public TerminalNode RPAREN() { return getToken(minisyysParser.RPAREN, 0); }
		public StatementContext statement() {
			return getRuleContext(StatementContext.class,0);
		}
		public WhilestatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_whilestatement; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterWhilestatement(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitWhilestatement(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitWhilestatement(this);
			else return visitor.visitChildren(this);
		}
	}

	public final WhilestatementContext whilestatement() throws RecognitionException {
		WhilestatementContext _localctx = new WhilestatementContext(_ctx, getState());
		enterRule(_localctx, 18, RULE_whilestatement);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(154);
			match(WHILE);
			setState(155);
			match(LPAREN);
			setState(156);
			expression();
			setState(157);
			match(RPAREN);
			setState(158);
			statement();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class JumpstatementContext extends ParserRuleContext {
		public TerminalNode BREAK() { return getToken(minisyysParser.BREAK, 0); }
		public TerminalNode SCOLON() { return getToken(minisyysParser.SCOLON, 0); }
		public TerminalNode CONTINUE() { return getToken(minisyysParser.CONTINUE, 0); }
		public JumpstatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_jumpstatement; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterJumpstatement(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitJumpstatement(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitJumpstatement(this);
			else return visitor.visitChildren(this);
		}
	}

	public final JumpstatementContext jumpstatement() throws RecognitionException {
		JumpstatementContext _localctx = new JumpstatementContext(_ctx, getState());
		enterRule(_localctx, 20, RULE_jumpstatement);
		try {
			setState(164);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case BREAK:
				enterOuterAlt(_localctx, 1);
				{
				setState(160);
				match(BREAK);
				setState(161);
				match(SCOLON);
				}
				break;
			case CONTINUE:
				enterOuterAlt(_localctx, 2);
				{
				setState(162);
				match(CONTINUE);
				setState(163);
				match(SCOLON);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class RetstatementContext extends ParserRuleContext {
		public TerminalNode RETURN() { return getToken(minisyysParser.RETURN, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public RetstatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_retstatement; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterRetstatement(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitRetstatement(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitRetstatement(this);
			else return visitor.visitChildren(this);
		}
	}

	public final RetstatementContext retstatement() throws RecognitionException {
		RetstatementContext _localctx = new RetstatementContext(_ctx, getState());
		enterRule(_localctx, 22, RULE_retstatement);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(166);
			match(RETURN);
			setState(168);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LPAREN) | (1L << ADD) | (1L << SUB) | (1L << EXCL) | (1L << ID) | (1L << INTP))) != 0)) {
				{
				setState(167);
				expression();
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class FunctionCallContext extends ParserRuleContext {
		public TerminalNode ID() { return getToken(minisyysParser.ID, 0); }
		public TerminalNode LPAREN() { return getToken(minisyysParser.LPAREN, 0); }
		public TerminalNode RPAREN() { return getToken(minisyysParser.RPAREN, 0); }
		public ExpressionListContext expressionList() {
			return getRuleContext(ExpressionListContext.class,0);
		}
		public FunctionCallContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_functionCall; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterFunctionCall(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitFunctionCall(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitFunctionCall(this);
			else return visitor.visitChildren(this);
		}
	}

	public final FunctionCallContext functionCall() throws RecognitionException {
		FunctionCallContext _localctx = new FunctionCallContext(_ctx, getState());
		enterRule(_localctx, 24, RULE_functionCall);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(170);
			match(ID);
			setState(171);
			match(LPAREN);
			setState(173);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LPAREN) | (1L << ADD) | (1L << SUB) | (1L << EXCL) | (1L << ID) | (1L << INTP))) != 0)) {
				{
				setState(172);
				expressionList();
				}
			}

			setState(175);
			match(RPAREN);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ExpressionListContext extends ParserRuleContext {
		public List<ExpressionContext> expression() {
			return getRuleContexts(ExpressionContext.class);
		}
		public ExpressionContext expression(int i) {
			return getRuleContext(ExpressionContext.class,i);
		}
		public List<TerminalNode> COMMA() { return getTokens(minisyysParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(minisyysParser.COMMA, i);
		}
		public ExpressionListContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_expressionList; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterExpressionList(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitExpressionList(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitExpressionList(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ExpressionListContext expressionList() throws RecognitionException {
		ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState());
		enterRule(_localctx, 26, RULE_expressionList);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(177);
			expression();
			setState(182);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(178);
				match(COMMA);
				setState(179);
				expression();
				}
				}
				setState(184);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ExpressionContext extends ParserRuleContext {
		public List<AndExprContext> andExpr() {
			return getRuleContexts(AndExprContext.class);
		}
		public AndExprContext andExpr(int i) {
			return getRuleContext(AndExprContext.class,i);
		}
		public List<TerminalNode> OR() { return getTokens(minisyysParser.OR); }
		public TerminalNode OR(int i) {
			return getToken(minisyysParser.OR, i);
		}
		public ExpressionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_expression; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterExpression(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitExpression(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitExpression(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ExpressionContext expression() throws RecognitionException {
		ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
		enterRule(_localctx, 28, RULE_expression);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(185);
			andExpr();
			setState(190);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==OR) {
				{
				{
				setState(186);
				match(OR);
				setState(187);
				andExpr();
				}
				}
				setState(192);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AndExprContext extends ParserRuleContext {
		public List<EqExprContext> eqExpr() {
			return getRuleContexts(EqExprContext.class);
		}
		public EqExprContext eqExpr(int i) {
			return getRuleContext(EqExprContext.class,i);
		}
		public List<TerminalNode> AND() { return getTokens(minisyysParser.AND); }
		public TerminalNode AND(int i) {
			return getToken(minisyysParser.AND, i);
		}
		public AndExprContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_andExpr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterAndExpr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitAndExpr(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitAndExpr(this);
			else return visitor.visitChildren(this);
		}
	}

	public final AndExprContext andExpr() throws RecognitionException {
		AndExprContext _localctx = new AndExprContext(_ctx, getState());
		enterRule(_localctx, 30, RULE_andExpr);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(193);
			eqExpr();
			setState(198);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==AND) {
				{
				{
				setState(194);
				match(AND);
				setState(195);
				eqExpr();
				}
				}
				setState(200);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class EqExprContext extends ParserRuleContext {
		public List<RelExprContext> relExpr() {
			return getRuleContexts(RelExprContext.class);
		}
		public RelExprContext relExpr(int i) {
			return getRuleContext(RelExprContext.class,i);
		}
		public List<TerminalNode> EQUALS() { return getTokens(minisyysParser.EQUALS); }
		public TerminalNode EQUALS(int i) {
			return getToken(minisyysParser.EQUALS, i);
		}
		public List<TerminalNode> NEQUALS() { return getTokens(minisyysParser.NEQUALS); }
		public TerminalNode NEQUALS(int i) {
			return getToken(minisyysParser.NEQUALS, i);
		}
		public EqExprContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_eqExpr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterEqExpr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitEqExpr(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitEqExpr(this);
			else return visitor.visitChildren(this);
		}
	}

	public final EqExprContext eqExpr() throws RecognitionException {
		EqExprContext _localctx = new EqExprContext(_ctx, getState());
		enterRule(_localctx, 32, RULE_eqExpr);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(201);
			relExpr();
			setState(206);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==EQUALS || _la==NEQUALS) {
				{
				{
				setState(202);
				_la = _input.LA(1);
				if ( !(_la==EQUALS || _la==NEQUALS) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				setState(203);
				relExpr();
				}
				}
				setState(208);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class RelExprContext extends ParserRuleContext {
		public List<AddExprContext> addExpr() {
			return getRuleContexts(AddExprContext.class);
		}
		public AddExprContext addExpr(int i) {
			return getRuleContext(AddExprContext.class,i);
		}
		public List<TerminalNode> GTEQUALS() { return getTokens(minisyysParser.GTEQUALS); }
		public TerminalNode GTEQUALS(int i) {
			return getToken(minisyysParser.GTEQUALS, i);
		}
		public List<TerminalNode> LTEQUALS() { return getTokens(minisyysParser.LTEQUALS); }
		public TerminalNode LTEQUALS(int i) {
			return getToken(minisyysParser.LTEQUALS, i);
		}
		public List<TerminalNode> MORETHAN() { return getTokens(minisyysParser.MORETHAN); }
		public TerminalNode MORETHAN(int i) {
			return getToken(minisyysParser.MORETHAN, i);
		}
		public List<TerminalNode> LESSTHAN() { return getTokens(minisyysParser.LESSTHAN); }
		public TerminalNode LESSTHAN(int i) {
			return getToken(minisyysParser.LESSTHAN, i);
		}
		public RelExprContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_relExpr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterRelExpr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitRelExpr(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitRelExpr(this);
			else return visitor.visitChildren(this);
		}
	}

	public final RelExprContext relExpr() throws RecognitionException {
		RelExprContext _localctx = new RelExprContext(_ctx, getState());
		enterRule(_localctx, 34, RULE_relExpr);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(209);
			addExpr();
			setState(214);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MORETHAN) | (1L << LESSTHAN) | (1L << GTEQUALS) | (1L << LTEQUALS))) != 0)) {
				{
				{
				setState(210);
				_la = _input.LA(1);
				if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MORETHAN) | (1L << LESSTHAN) | (1L << GTEQUALS) | (1L << LTEQUALS))) != 0)) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				setState(211);
				addExpr();
				}
				}
				setState(216);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AddExprContext extends ParserRuleContext {
		public List<MulExprContext> mulExpr() {
			return getRuleContexts(MulExprContext.class);
		}
		public MulExprContext mulExpr(int i) {
			return getRuleContext(MulExprContext.class,i);
		}
		public List<TerminalNode> ADD() { return getTokens(minisyysParser.ADD); }
		public TerminalNode ADD(int i) {
			return getToken(minisyysParser.ADD, i);
		}
		public List<TerminalNode> SUB() { return getTokens(minisyysParser.SUB); }
		public TerminalNode SUB(int i) {
			return getToken(minisyysParser.SUB, i);
		}
		public AddExprContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_addExpr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterAddExpr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitAddExpr(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitAddExpr(this);
			else return visitor.visitChildren(this);
		}
	}

	public final AddExprContext addExpr() throws RecognitionException {
		AddExprContext _localctx = new AddExprContext(_ctx, getState());
		enterRule(_localctx, 36, RULE_addExpr);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(217);
			mulExpr();
			setState(222);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==ADD || _la==SUB) {
				{
				{
				setState(218);
				_la = _input.LA(1);
				if ( !(_la==ADD || _la==SUB) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				setState(219);
				mulExpr();
				}
				}
				setState(224);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class MulExprContext extends ParserRuleContext {
		public List<OpExprContext> opExpr() {
			return getRuleContexts(OpExprContext.class);
		}
		public OpExprContext opExpr(int i) {
			return getRuleContext(OpExprContext.class,i);
		}
		public List<TerminalNode> MUL() { return getTokens(minisyysParser.MUL); }
		public TerminalNode MUL(int i) {
			return getToken(minisyysParser.MUL, i);
		}
		public List<TerminalNode> DIV() { return getTokens(minisyysParser.DIV); }
		public TerminalNode DIV(int i) {
			return getToken(minisyysParser.DIV, i);
		}
		public List<TerminalNode> MODULUS() { return getTokens(minisyysParser.MODULUS); }
		public TerminalNode MODULUS(int i) {
			return getToken(minisyysParser.MODULUS, i);
		}
		public MulExprContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_mulExpr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterMulExpr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitMulExpr(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitMulExpr(this);
			else return visitor.visitChildren(this);
		}
	}

	public final MulExprContext mulExpr() throws RecognitionException {
		MulExprContext _localctx = new MulExprContext(_ctx, getState());
		enterRule(_localctx, 38, RULE_mulExpr);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(225);
			opExpr();
			setState(230);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MUL) | (1L << DIV) | (1L << MODULUS))) != 0)) {
				{
				{
				setState(226);
				_la = _input.LA(1);
				if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MUL) | (1L << DIV) | (1L << MODULUS))) != 0)) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				setState(227);
				opExpr();
				}
				}
				setState(232);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class OpExprContext extends ParserRuleContext {
		public AtomContext atom() {
			return getRuleContext(AtomContext.class,0);
		}
		public List<UnopContext> unop() {
			return getRuleContexts(UnopContext.class);
		}
		public UnopContext unop(int i) {
			return getRuleContext(UnopContext.class,i);
		}
		public OpExprContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_opExpr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterOpExpr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitOpExpr(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitOpExpr(this);
			else return visitor.visitChildren(this);
		}
	}

	public final OpExprContext opExpr() throws RecognitionException {
		OpExprContext _localctx = new OpExprContext(_ctx, getState());
		enterRule(_localctx, 40, RULE_opExpr);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(236);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ADD) | (1L << SUB) | (1L << EXCL))) != 0)) {
				{
				{
				setState(233);
				unop();
				}
				}
				setState(238);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(239);
			atom();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class UnopContext extends ParserRuleContext {
		public TerminalNode SUB() { return getToken(minisyysParser.SUB, 0); }
		public TerminalNode EXCL() { return getToken(minisyysParser.EXCL, 0); }
		public TerminalNode ADD() { return getToken(minisyysParser.ADD, 0); }
		public UnopContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_unop; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterUnop(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitUnop(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitUnop(this);
			else return visitor.visitChildren(this);
		}
	}

	public final UnopContext unop() throws RecognitionException {
		UnopContext _localctx = new UnopContext(_ctx, getState());
		enterRule(_localctx, 42, RULE_unop);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(241);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ADD) | (1L << SUB) | (1L << EXCL))) != 0)) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AtomContext extends ParserRuleContext {
		public TerminalNode INTP() { return getToken(minisyysParser.INTP, 0); }
		public LookupContext lookup() {
			return getRuleContext(LookupContext.class,0);
		}
		public AtomContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_atom; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterAtom(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitAtom(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitAtom(this);
			else return visitor.visitChildren(this);
		}
	}

	public final AtomContext atom() throws RecognitionException {
		AtomContext _localctx = new AtomContext(_ctx, getState());
		enterRule(_localctx, 44, RULE_atom);
		try {
			setState(245);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case INTP:
				enterOuterAlt(_localctx, 1);
				{
				setState(243);
				match(INTP);
				}
				break;
			case LPAREN:
			case ID:
				enterOuterAlt(_localctx, 2);
				{
				setState(244);
				lookup();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class LookupContext extends ParserRuleContext {
		public FunctionCallContext functionCall() {
			return getRuleContext(FunctionCallContext.class,0);
		}
		public IndexContext index() {
			return getRuleContext(IndexContext.class,0);
		}
		public TerminalNode LPAREN() { return getToken(minisyysParser.LPAREN, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public TerminalNode RPAREN() { return getToken(minisyysParser.RPAREN, 0); }
		public TerminalNode ID() { return getToken(minisyysParser.ID, 0); }
		public LookupContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_lookup; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterLookup(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitLookup(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitLookup(this);
			else return visitor.visitChildren(this);
		}
	}

	public final LookupContext lookup() throws RecognitionException {
		LookupContext _localctx = new LookupContext(_ctx, getState());
		enterRule(_localctx, 46, RULE_lookup);
		int _la;
		try {
			setState(261);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(247);
				functionCall();
				setState(249);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==LBRACKET) {
					{
					setState(248);
					index();
					}
				}

				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(251);
				match(LPAREN);
				setState(252);
				expression();
				setState(253);
				match(RPAREN);
				setState(255);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==LBRACKET) {
					{
					setState(254);
					index();
					}
				}

				}
				break;
			case 3:
				enterOuterAlt(_localctx, 3);
				{
				setState(257);
				match(ID);
				setState(259);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==LBRACKET) {
					{
					setState(258);
					index();
					}
				}

				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class IndexContext extends ParserRuleContext {
		public TerminalNode LBRACKET() { return getToken(minisyysParser.LBRACKET, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public TerminalNode RBRACKET() { return getToken(minisyysParser.RBRACKET, 0); }
		public IndexContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_index; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterIndex(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitIndex(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitIndex(this);
			else return visitor.visitChildren(this);
		}
	}

	public final IndexContext index() throws RecognitionException {
		IndexContext _localctx = new IndexContext(_ctx, getState());
		enterRule(_localctx, 48, RULE_index);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(263);
			match(LBRACKET);
			setState(264);
			expression();
			setState(265);
			match(RBRACKET);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class DeclarationarIdContext extends ParserRuleContext {
		public List<ArrContext> arr() {
			return getRuleContexts(ArrContext.class);
		}
		public ArrContext arr(int i) {
			return getRuleContext(ArrContext.class,i);
		}
		public TerminalNode CONST() { return getToken(minisyysParser.CONST, 0); }
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public List<TerminalNode> COMMA() { return getTokens(minisyysParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(minisyysParser.COMMA, i);
		}
		public DeclarationarIdContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_declarationarId; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterDeclarationarId(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitDeclarationarId(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitDeclarationarId(this);
			else return visitor.visitChildren(this);
		}
	}

	public final DeclarationarIdContext declarationarId() throws RecognitionException {
		DeclarationarIdContext _localctx = new DeclarationarIdContext(_ctx, getState());
		enterRule(_localctx, 50, RULE_declarationarId);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(268);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==CONST) {
				{
				setState(267);
				match(CONST);
				}
			}

			setState(271);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==VOID || _la==INT) {
				{
				setState(270);
				type();
				}
			}

			setState(273);
			arr();
			setState(278);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(274);
				match(COMMA);
				setState(275);
				arr();
				}
				}
				setState(280);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class DeclarationIdContext extends ParserRuleContext {
		public List<AssContext> ass() {
			return getRuleContexts(AssContext.class);
		}
		public AssContext ass(int i) {
			return getRuleContext(AssContext.class,i);
		}
		public TerminalNode CONST() { return getToken(minisyysParser.CONST, 0); }
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public List<TerminalNode> COMMA() { return getTokens(minisyysParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(minisyysParser.COMMA, i);
		}
		public DeclarationIdContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_declarationId; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterDeclarationId(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitDeclarationId(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitDeclarationId(this);
			else return visitor.visitChildren(this);
		}
	}

	public final DeclarationIdContext declarationId() throws RecognitionException {
		DeclarationIdContext _localctx = new DeclarationIdContext(_ctx, getState());
		enterRule(_localctx, 52, RULE_declarationId);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(282);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==CONST) {
				{
				setState(281);
				match(CONST);
				}
			}

			setState(285);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==VOID || _la==INT) {
				{
				setState(284);
				type();
				}
			}

			setState(287);
			ass();
			setState(292);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(288);
				match(COMMA);
				setState(289);
				ass();
				}
				}
				setState(294);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ArrContext extends ParserRuleContext {
		public TerminalNode ID() { return getToken(minisyysParser.ID, 0); }
		public List<IndexContext> index() {
			return getRuleContexts(IndexContext.class);
		}
		public IndexContext index(int i) {
			return getRuleContext(IndexContext.class,i);
		}
		public TerminalNode ASSIGN() { return getToken(minisyysParser.ASSIGN, 0); }
		public IniListContext iniList() {
			return getRuleContext(IniListContext.class,0);
		}
		public ArrContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_arr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterArr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitArr(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitArr(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ArrContext arr() throws RecognitionException {
		ArrContext _localctx = new ArrContext(_ctx, getState());
		enterRule(_localctx, 54, RULE_arr);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(295);
			match(ID);
			setState(297); 
			_errHandler.sync(this);
			_la = _input.LA(1);
			do {
				{
				{
				setState(296);
				index();
				}
				}
				setState(299); 
				_errHandler.sync(this);
				_la = _input.LA(1);
			} while ( _la==LBRACKET );
			setState(303);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==ASSIGN) {
				{
				setState(301);
				match(ASSIGN);
				setState(302);
				iniList();
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class IniListContext extends ParserRuleContext {
		public TerminalNode LBRACE() { return getToken(minisyysParser.LBRACE, 0); }
		public List<IniContext> ini() {
			return getRuleContexts(IniContext.class);
		}
		public IniContext ini(int i) {
			return getRuleContext(IniContext.class,i);
		}
		public TerminalNode RBRACE() { return getToken(minisyysParser.RBRACE, 0); }
		public List<TerminalNode> COMMA() { return getTokens(minisyysParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(minisyysParser.COMMA, i);
		}
		public IniListContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_iniList; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterIniList(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitIniList(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitIniList(this);
			else return visitor.visitChildren(this);
		}
	}

	public final IniListContext iniList() throws RecognitionException {
		IniListContext _localctx = new IniListContext(_ctx, getState());
		enterRule(_localctx, 56, RULE_iniList);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(305);
			match(LBRACE);
			setState(306);
			ini();
			setState(311);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(307);
				match(COMMA);
				setState(308);
				ini();
				}
				}
				setState(313);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(314);
			match(RBRACE);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class IniContext extends ParserRuleContext {
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public IniContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_ini; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterIni(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitIni(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitIni(this);
			else return visitor.visitChildren(this);
		}
	}

	public final IniContext ini() throws RecognitionException {
		IniContext _localctx = new IniContext(_ctx, getState());
		enterRule(_localctx, 58, RULE_ini);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(316);
			expression();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AssContext extends ParserRuleContext {
		public TerminalNode ID() { return getToken(minisyysParser.ID, 0); }
		public TerminalNode ASSIGN() { return getToken(minisyysParser.ASSIGN, 0); }
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public AssContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_ass; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).enterAss(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof minisyysListener ) ((minisyysListener)listener).exitAss(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof minisyysVisitor ) return ((minisyysVisitor<? extends T>)visitor).visitAss(this);
			else return visitor.visitChildren(this);
		}
	}

	public final AssContext ass() throws RecognitionException {
		AssContext _localctx = new AssContext(_ctx, getState());
		enterRule(_localctx, 60, RULE_ass);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(318);
			match(ID);
			setState(321);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==ASSIGN) {
				{
				setState(319);
				match(ASSIGN);
				setState(320);
				expression();
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static final String _serializedATN =
		"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3,\u0146\4\2\t\2\4"+
		"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+
		"\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
		"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
		"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \3\2"+
		"\3\2\7\2C\n\2\f\2\16\2F\13\2\3\2\3\2\3\3\5\3K\n\3\3\3\3\3\3\3\3\3\7\3"+
		"Q\n\3\f\3\16\3T\13\3\3\3\3\3\3\4\3\4\3\4\3\4\5\4\\\n\4\3\4\3\4\3\4\3\5"+
		"\3\5\3\5\3\5\3\5\3\5\7\5g\n\5\f\5\16\5j\13\5\3\6\3\6\3\7\3\7\7\7p\n\7"+
		"\f\7\16\7s\13\7\3\7\3\7\3\b\3\b\7\by\n\b\f\b\16\b|\13\b\3\b\3\b\3\t\3"+
		"\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\5\t"+
		"\u0092\n\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u009b\n\n\3\13\3\13\3\13\3"+
		"\13\3\13\3\13\3\f\3\f\3\f\3\f\5\f\u00a7\n\f\3\r\3\r\5\r\u00ab\n\r\3\16"+
		"\3\16\3\16\5\16\u00b0\n\16\3\16\3\16\3\17\3\17\3\17\7\17\u00b7\n\17\f"+
		"\17\16\17\u00ba\13\17\3\20\3\20\3\20\7\20\u00bf\n\20\f\20\16\20\u00c2"+
		"\13\20\3\21\3\21\3\21\7\21\u00c7\n\21\f\21\16\21\u00ca\13\21\3\22\3\22"+
		"\3\22\7\22\u00cf\n\22\f\22\16\22\u00d2\13\22\3\23\3\23\3\23\7\23\u00d7"+
		"\n\23\f\23\16\23\u00da\13\23\3\24\3\24\3\24\7\24\u00df\n\24\f\24\16\24"+
		"\u00e2\13\24\3\25\3\25\3\25\7\25\u00e7\n\25\f\25\16\25\u00ea\13\25\3\26"+
		"\7\26\u00ed\n\26\f\26\16\26\u00f0\13\26\3\26\3\26\3\27\3\27\3\30\3\30"+
		"\5\30\u00f8\n\30\3\31\3\31\5\31\u00fc\n\31\3\31\3\31\3\31\3\31\5\31\u0102"+
		"\n\31\3\31\3\31\5\31\u0106\n\31\5\31\u0108\n\31\3\32\3\32\3\32\3\32\3"+
		"\33\5\33\u010f\n\33\3\33\5\33\u0112\n\33\3\33\3\33\3\33\7\33\u0117\n\33"+
		"\f\33\16\33\u011a\13\33\3\34\5\34\u011d\n\34\3\34\5\34\u0120\n\34\3\34"+
		"\3\34\3\34\7\34\u0125\n\34\f\34\16\34\u0128\13\34\3\35\3\35\6\35\u012c"+
		"\n\35\r\35\16\35\u012d\3\35\3\35\5\35\u0132\n\35\3\36\3\36\3\36\3\36\7"+
		"\36\u0138\n\36\f\36\16\36\u013b\13\36\3\36\3\36\3\37\3\37\3 \3 \3 \5 "+
		"\u0144\n \3 \2\2!\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62"+
		"\64\668:<>\2\b\3\2\4\5\3\2\30\31\3\2\32\35\3\2\22\23\3\2\24\26\4\2\22"+
		"\23%%\2\u0152\2D\3\2\2\2\4J\3\2\2\2\6W\3\2\2\2\b`\3\2\2\2\nk\3\2\2\2\f"+
		"m\3\2\2\2\16v\3\2\2\2\20\u0091\3\2\2\2\22\u0093\3\2\2\2\24\u009c\3\2\2"+
		"\2\26\u00a6\3\2\2\2\30\u00a8\3\2\2\2\32\u00ac\3\2\2\2\34\u00b3\3\2\2\2"+
		"\36\u00bb\3\2\2\2 \u00c3\3\2\2\2\"\u00cb\3\2\2\2$\u00d3\3\2\2\2&\u00db"+
		"\3\2\2\2(\u00e3\3\2\2\2*\u00ee\3\2\2\2,\u00f3\3\2\2\2.\u00f7\3\2\2\2\60"+
		"\u0107\3\2\2\2\62\u0109\3\2\2\2\64\u010e\3\2\2\2\66\u011c\3\2\2\28\u0129"+
		"\3\2\2\2:\u0133\3\2\2\2<\u013e\3\2\2\2>\u0140\3\2\2\2@C\5\4\3\2AC\5\6"+
		"\4\2B@\3\2\2\2BA\3\2\2\2CF\3\2\2\2DB\3\2\2\2DE\3\2\2\2EG\3\2\2\2FD\3\2"+
		"\2\2GH\7\2\2\3H\3\3\2\2\2IK\7\3\2\2JI\3\2\2\2JK\3\2\2\2KL\3\2\2\2LM\5"+
		"\n\6\2MR\5> \2NO\7\"\2\2OQ\5> \2PN\3\2\2\2QT\3\2\2\2RP\3\2\2\2RS\3\2\2"+
		"\2SU\3\2\2\2TR\3\2\2\2UV\7 \2\2V\5\3\2\2\2WX\5\n\6\2XY\7&\2\2Y[\7\f\2"+
		"\2Z\\\5\b\5\2[Z\3\2\2\2[\\\3\2\2\2\\]\3\2\2\2]^\7\r\2\2^_\5\f\7\2_\7\3"+
		"\2\2\2`a\5\n\6\2ah\7&\2\2bc\7\"\2\2cd\5\n\6\2de\7&\2\2eg\3\2\2\2fb\3\2"+
		"\2\2gj\3\2\2\2hf\3\2\2\2hi\3\2\2\2i\t\3\2\2\2jh\3\2\2\2kl\t\2\2\2l\13"+
		"\3\2\2\2mq\7\16\2\2np\5\20\t\2on\3\2\2\2ps\3\2\2\2qo\3\2\2\2qr\3\2\2\2"+
		"rt\3\2\2\2sq\3\2\2\2tu\7\17\2\2u\r\3\2\2\2vz\7\16\2\2wy\5\20\t\2xw\3\2"+
		"\2\2y|\3\2\2\2zx\3\2\2\2z{\3\2\2\2{}\3\2\2\2|z\3\2\2\2}~\7\17\2\2~\17"+
		"\3\2\2\2\177\u0092\5\16\b\2\u0080\u0092\5\22\n\2\u0081\u0092\5\24\13\2"+
		"\u0082\u0092\5\26\f\2\u0083\u0084\5\30\r\2\u0084\u0085\7 \2\2\u0085\u0092"+
		"\3\2\2\2\u0086\u0087\5\32\16\2\u0087\u0088\7 \2\2\u0088\u0092\3\2\2\2"+
		"\u0089\u008a\5\64\33\2\u008a\u008b\7 \2\2\u008b\u0092\3\2\2\2\u008c\u008d"+
		"\5\66\34\2\u008d\u008e\7 \2\2\u008e\u0092\3\2\2\2\u008f\u0090\7&\2\2\u0090"+
		"\u0092\7 \2\2\u0091\177\3\2\2\2\u0091\u0080\3\2\2\2\u0091\u0081\3\2\2"+
		"\2\u0091\u0082\3\2\2\2\u0091\u0083\3\2\2\2\u0091\u0086\3\2\2\2\u0091\u0089"+
		"\3\2\2\2\u0091\u008c\3\2\2\2\u0091\u008f\3\2\2\2\u0092\21\3\2\2\2\u0093"+
		"\u0094\7\n\2\2\u0094\u0095\7\f\2\2\u0095\u0096\5\36\20\2\u0096\u0097\7"+
		"\r\2\2\u0097\u009a\5\20\t\2\u0098\u0099\7\13\2\2\u0099\u009b\5\20\t\2"+
		"\u009a\u0098\3\2\2\2\u009a\u009b\3\2\2\2\u009b\23\3\2\2\2\u009c\u009d"+
		"\7\6\2\2\u009d\u009e\7\f\2\2\u009e\u009f\5\36\20\2\u009f\u00a0\7\r\2\2"+
		"\u00a0\u00a1\5\20\t\2\u00a1\25\3\2\2\2\u00a2\u00a3\7\7\2\2\u00a3\u00a7"+
		"\7 \2\2\u00a4\u00a5\7\b\2\2\u00a5\u00a7\7 \2\2\u00a6\u00a2\3\2\2\2\u00a6"+
		"\u00a4\3\2\2\2\u00a7\27\3\2\2\2\u00a8\u00aa\7\t\2\2\u00a9\u00ab\5\36\20"+
		"\2\u00aa\u00a9\3\2\2\2\u00aa\u00ab\3\2\2\2\u00ab\31\3\2\2\2\u00ac\u00ad"+
		"\7&\2\2\u00ad\u00af\7\f\2\2\u00ae\u00b0\5\34\17\2\u00af\u00ae\3\2\2\2"+
		"\u00af\u00b0\3\2\2\2\u00b0\u00b1\3\2\2\2\u00b1\u00b2\7\r\2\2\u00b2\33"+
		"\3\2\2\2\u00b3\u00b8\5\36\20\2\u00b4\u00b5\7\"\2\2\u00b5\u00b7\5\36\20"+
		"\2\u00b6\u00b4\3\2\2\2\u00b7\u00ba\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b8\u00b9"+
		"\3\2\2\2\u00b9\35\3\2\2\2\u00ba\u00b8\3\2\2\2\u00bb\u00c0\5 \21\2\u00bc"+
		"\u00bd\7\36\2\2\u00bd\u00bf\5 \21\2\u00be\u00bc\3\2\2\2\u00bf\u00c2\3"+
		"\2\2\2\u00c0\u00be\3\2\2\2\u00c0\u00c1\3\2\2\2\u00c1\37\3\2\2\2\u00c2"+
		"\u00c0\3\2\2\2\u00c3\u00c8\5\"\22\2\u00c4\u00c5\7\37\2\2\u00c5\u00c7\5"+
		"\"\22\2\u00c6\u00c4\3\2\2\2\u00c7\u00ca\3\2\2\2\u00c8\u00c6\3\2\2\2\u00c8"+
		"\u00c9\3\2\2\2\u00c9!\3\2\2\2\u00ca\u00c8\3\2\2\2\u00cb\u00d0\5$\23\2"+
		"\u00cc\u00cd\t\3\2\2\u00cd\u00cf\5$\23\2\u00ce\u00cc\3\2\2\2\u00cf\u00d2"+
		"\3\2\2\2\u00d0\u00ce\3\2\2\2\u00d0\u00d1\3\2\2\2\u00d1#\3\2\2\2\u00d2"+
		"\u00d0\3\2\2\2\u00d3\u00d8\5&\24\2\u00d4\u00d5\t\4\2\2\u00d5\u00d7\5&"+
		"\24\2\u00d6\u00d4\3\2\2\2\u00d7\u00da\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d8"+
		"\u00d9\3\2\2\2\u00d9%\3\2\2\2\u00da\u00d8\3\2\2\2\u00db\u00e0\5(\25\2"+
		"\u00dc\u00dd\t\5\2\2\u00dd\u00df\5(\25\2\u00de\u00dc\3\2\2\2\u00df\u00e2"+
		"\3\2\2\2\u00e0\u00de\3\2\2\2\u00e0\u00e1\3\2\2\2\u00e1\'\3\2\2\2\u00e2"+
		"\u00e0\3\2\2\2\u00e3\u00e8\5*\26\2\u00e4\u00e5\t\6\2\2\u00e5\u00e7\5*"+
		"\26\2\u00e6\u00e4\3\2\2\2\u00e7\u00ea\3\2\2\2\u00e8\u00e6\3\2\2\2\u00e8"+
		"\u00e9\3\2\2\2\u00e9)\3\2\2\2\u00ea\u00e8\3\2\2\2\u00eb\u00ed\5,\27\2"+
		"\u00ec\u00eb\3\2\2\2\u00ed\u00f0\3\2\2\2\u00ee\u00ec\3\2\2\2\u00ee\u00ef"+
		"\3\2\2\2\u00ef\u00f1\3\2\2\2\u00f0\u00ee\3\2\2\2\u00f1\u00f2\5.\30\2\u00f2"+
		"+\3\2\2\2\u00f3\u00f4\t\7\2\2\u00f4-\3\2\2\2\u00f5\u00f8\7\'\2\2\u00f6"+
		"\u00f8\5\60\31\2\u00f7\u00f5\3\2\2\2\u00f7\u00f6\3\2\2\2\u00f8/\3\2\2"+
		"\2\u00f9\u00fb\5\32\16\2\u00fa\u00fc\5\62\32\2\u00fb\u00fa\3\2\2\2\u00fb"+
		"\u00fc\3\2\2\2\u00fc\u0108\3\2\2\2\u00fd\u00fe\7\f\2\2\u00fe\u00ff\5\36"+
		"\20\2\u00ff\u0101\7\r\2\2\u0100\u0102\5\62\32\2\u0101\u0100\3\2\2\2\u0101"+
		"\u0102\3\2\2\2\u0102\u0108\3\2\2\2\u0103\u0105\7&\2\2\u0104\u0106\5\62"+
		"\32\2\u0105\u0104\3\2\2\2\u0105\u0106\3\2\2\2\u0106\u0108\3\2\2\2\u0107"+
		"\u00f9\3\2\2\2\u0107\u00fd\3\2\2\2\u0107\u0103\3\2\2\2\u0108\61\3\2\2"+
		"\2\u0109\u010a\7\20\2\2\u010a\u010b\5\36\20\2\u010b\u010c\7\21\2\2\u010c"+
		"\63\3\2\2\2\u010d\u010f\7\3\2\2\u010e\u010d\3\2\2\2\u010e\u010f\3\2\2"+
		"\2\u010f\u0111\3\2\2\2\u0110\u0112\5\n\6\2\u0111\u0110\3\2\2\2\u0111\u0112"+
		"\3\2\2\2\u0112\u0113\3\2\2\2\u0113\u0118\58\35\2\u0114\u0115\7\"\2\2\u0115"+
		"\u0117\58\35\2\u0116\u0114\3\2\2\2\u0117\u011a\3\2\2\2\u0118\u0116\3\2"+
		"\2\2\u0118\u0119\3\2\2\2\u0119\65\3\2\2\2\u011a\u0118\3\2\2\2\u011b\u011d"+
		"\7\3\2\2\u011c\u011b\3\2\2\2\u011c\u011d\3\2\2\2\u011d\u011f\3\2\2\2\u011e"+
		"\u0120\5\n\6\2\u011f\u011e\3\2\2\2\u011f\u0120\3\2\2\2\u0120\u0121\3\2"+
		"\2\2\u0121\u0126\5> \2\u0122\u0123\7\"\2\2\u0123\u0125\5> \2\u0124\u0122"+
		"\3\2\2\2\u0125\u0128\3\2\2\2\u0126\u0124\3\2\2\2\u0126\u0127\3\2\2\2\u0127"+
		"\67\3\2\2\2\u0128\u0126\3\2\2\2\u0129\u012b\7&\2\2\u012a\u012c\5\62\32"+
		"\2\u012b\u012a\3\2\2\2\u012c\u012d\3\2\2\2\u012d\u012b\3\2\2\2\u012d\u012e"+
		"\3\2\2\2\u012e\u0131\3\2\2\2\u012f\u0130\7!\2\2\u0130\u0132\5:\36\2\u0131"+
		"\u012f\3\2\2\2\u0131\u0132\3\2\2\2\u01329\3\2\2\2\u0133\u0134\7\16\2\2"+
		"\u0134\u0139\5<\37\2\u0135\u0136\7\"\2\2\u0136\u0138\5<\37\2\u0137\u0135"+
		"\3\2\2\2\u0138\u013b\3\2\2\2\u0139\u0137\3\2\2\2\u0139\u013a\3\2\2\2\u013a"+
		"\u013c\3\2\2\2\u013b\u0139\3\2\2\2\u013c\u013d\7\17\2\2\u013d;\3\2\2\2"+
		"\u013e\u013f\5\36\20\2\u013f=\3\2\2\2\u0140\u0143\7&\2\2\u0141\u0142\7"+
		"!\2\2\u0142\u0144\5\36\20\2\u0143\u0141\3\2\2\2\u0143\u0144\3\2\2\2\u0144"+
		"?\3\2\2\2&BDJR[hqz\u0091\u009a\u00a6\u00aa\u00af\u00b8\u00c0\u00c8\u00d0"+
		"\u00d8\u00e0\u00e8\u00ee\u00f7\u00fb\u0101\u0105\u0107\u010e\u0111\u0118"+
		"\u011c\u011f\u0126\u012d\u0131\u0139\u0143";
	public static final ATN _ATN =
		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
	static {
		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
		}
	}
}